import request from '@/utils/request'

/*
菜单管理相关的API请求函数
*/
const api_name = '/schoolMessage/provinceCityRegion'

export default {

    getAreaTree() {
        return request({
            url: `${api_name}/getAreaTree`,
            method: "get"
        })
    },

    list(query) {
        return request({
            url: `${api_name}/list`,
            method: "get",
            params: query
        })
    },

    /**
     * 根据省id查询出该省所有区
     * @param provinceId
     * @returns {*}
     */
    listRegionByProvinceId(provinceId) {
        return request({
            url: `${api_name}/listRegionByProvinceId`,
            method: "get",
            params: {provinceId: provinceId}
        })
    },

}